Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use std::filesystem instead of windows API in Orbiter core #424

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

TheGondos
Copy link
Contributor

This is a follow-up to PR #374 which failed to build after the C++ version was demoted.
It is the same as the original PR with the "auto &&" (abbreviated function template?) replaced with "std::function" parameters.

@jarmonik jarmonik merged commit 5005c0a into orbitersim:main Jan 23, 2024
3 checks passed
@spacex15
Copy link
Contributor

Does not compile on visual studio 2022 64 bits

ifstream ulf(entry); in psys.cpp

Gravité Code Description Projet Fichier Ligne État de la suppression Détails
Erreur (active) E0289 aucune instance du constructeur "std::basic_ifstream<_Elem, _Traits>::basic_ifstream [avec _Elem=char, _Traits=std::char_traits]" ne correspond à la liste d'arguments Orbiter.exe (Modules\Server\Orbiter.exe) - C:\orbisource2\orbiter\Src\Orbiter\Psys.cpp 233

@jarmonik
Copy link
Contributor

That's odd. I did test compile it on VS2019 before merge (x86). Have you tried x86 ?

@TheGondos
Copy link
Contributor Author

TheGondos commented Jan 23, 2024

Couldn't find a single compiler that accepts this on compiler explorer, so it must work only on VS2019 :sadface:
Managed to get clang/gcc to compile a minimal example by replacing the offending line with this :
ifstream ulf(entry.path());
@spacex15 : since I cannot test it (using VS2019 here), can you confirm it works on your side so I can push the fix?
Thanks

@dimitry-ishenko
Copy link
Contributor

Couldn't find a single compiler that accepts this on compiler explorer, so it must work only on VS2019 :sadface:

@TheGondos https://godbolt.org/z/jqdKen91d

Your fix of adding .path() after entry is correct.

@spacex15
Copy link
Contributor

@TheGondos I confirm the fix works on visual studio 2022

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants